package com.sunwayworld.baseline.listener;

import com.sunwayworld.baseline.framework.FeishuSsoAuthenticator;
import com.sunwayworld.basemodule.business.result.computing.formula.ResultFormulaRepository;
import com.sunwayworld.framework.formula.GikamFormulaRegistry;
import com.sunwayworld.framework.security.sso.SsoAuthenticatorRegistry;
import com.sunwayworld.framework.utils.ArithUtils;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Component
public class LimsApplicationReadyListener implements ApplicationListener<ApplicationReadyEvent> {

    @Override
    public void onApplicationEvent(ApplicationReadyEvent event) {
        GikamFormulaRegistry.INSTANCE.register(ResultFormulaRepository.class);
        ArithUtils.eval("0+0");
        SsoAuthenticatorRegistry.INSTANCE.register("eisso", FeishuSsoAuthenticator.class);
    }
}
